# -*- coding: utf-8 -*-
"""
Created on Mon Aug 19 13:23:48 2013

@author: Maxim
"""
import geometry as geom
from numpy import polyfit, array, zeros
import airfoil as af
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit

class CSTfit():
    def __init__(self):
        self.clsFcn = geom.ClassFcn()
    def fit(self,afcoord, order=3):
        self.coord = afcoord
        self.order = int(order)
        yshape = self.coord[:,1] - self.clsFcn(self.coord[:,0])
        print yshape

def run_test_01():
    af1 = af.load('GA37A315')
    fit = CSTfit()
    fit.fit(af1.upPts)

if __name__=="__main__":
    run_test_01()